package znbkTestPaperLstjt.fragmentAdapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import znbkTestPaperLstjt.fragment.HistoryRecommendQuesPaperFragment;

import static znbkTestPaperLstjt.activity.HistoryRecommendQuesPaperActivity.mEntityLstjt;

/**
 * Created by Administrator on 2018\4\9 0009.
 */

public class HistoryRecommendQuesPaperFragmentAdapter extends FragmentPagerAdapter {

    public HistoryRecommendQuesPaperFragmentAdapter(FragmentManager fm) {
        super(fm);
    }
    @Override
    public int getCount() {
        int sumCount = 0 ;
        if(mEntityLstjt != null){
            sumCount = mEntityLstjt.size();
//            Log.e("===getCount==","======sumCount======"+sumCount);
        }
        return sumCount;
    }
    @Override
    public Fragment getItem(int position) {
        return HistoryRecommendQuesPaperFragment.newInstance(position);
    }

//    @Override
//    public int getItemPosition(Object object) {
//        // 最简单解决 notifyDataSetChanged() 页面不刷新问题的方法
//        return POSITION_NONE;
//    }

}